package cn.whuc.scala.functional

object ScalaFunction {
  def main(args: Array[String]): Unit = {
    /*
      可变参数
      参数默认值

     */

    def fun1(s:String*): Unit = {
      println("可变参数"+s)
    }
    fun1()
    fun1("zs")
    fun1("zs","ls")

    def fun2(name:String,pass:String="123"):Unit = {
      println(name+"--->>>"+pass)
    }
    fun2("ls")
    fun2("zs","1111")

    def fun3(name:String="abc",pass:String):Unit = {
      println(name+"--->>>"+pass)
    }
    // 只为密码传值
    fun3(pass = "aaaaaa")



  }

}
